package com.jomoo.css.common.util.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jomoo.css.common.util.domain.BaseFile;
import com.jomoo.css.common.util.mapper.BaseFileMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class BaseFileService extends ServiceImpl<BaseFileMapper, BaseFile> {

    public BaseFile getByRelId(String relId){
        QueryWrapper<BaseFile> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("req_id", relId);
        return getBaseMapper().selectOne(queryWrapper);
    }

}
